package com.bs.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bs.entity.ClockInfo;
import com.bs.mapper.ClockInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.HashMap;
import java.util.List;

@Service
public class ClockInfoService extends ServiceImpl<ClockInfoMapper, ClockInfo> {
    @Autowired
    ClockInfoMapper clockInfoMapper;

    public Boolean saveClockInfo(ClockInfo clockInfo) {
        return save(clockInfo);
    }

    public Integer getClock(){
        return clockInfoMapper.selectClock();
    }

    public Integer getPwd(){
        return clockInfoMapper.selectPwd();
    }

    public Integer getDuration(){
        return clockInfoMapper.selectDuration();
    }


    public void changClockSys(Boolean flag) {
        clockInfoMapper.changClockSys(flag);
    }

    public void changePasswordSys(Boolean flag) {
        clockInfoMapper.changePasswordSys(flag);
    }

    public boolean changeDuration(Integer duration) {
       return clockInfoMapper.changeDuration(duration);
    }
}
